/**
 * Filename: StickyGridHeadersBaseAdapter.java
 * @author  Firefly
 * @contact postfirefly@163.com
 * @time    2016/3/10 0:53
 */
package com.github.postsanf.yinian.nativestick;

import android.view.View;
import android.view.ViewGroup;
import android.widget.ListAdapter;

public interface StickyGridHeadersBaseAdapter extends ListAdapter {

    public int getCountForHeader(int header);

    /**
     * Get the number of headers in the adapter's data set.
     * @return Number of headers.
     */
    public int getNumHeaders();

    /**
     * Get a View that displays the header data at the specified position in the
     * set. You can either create a View manually or inflate it from an XML
     * menu_action_tofind file.
     * @param position
     *            The position of the header within the adapter's header data
     *            set.
     * @param convertView
     *            The old view to reuse, if possible. Note: You should check
     *            that this view is non-null and of an appropriate type before
     *            using. If it is not possible to convert this view to display
     *            the correct data, this method can create a new view.
     * @param parent
     *            The parent that this view will eventually be attached to.
     * @return A View corresponding to the data at the specified position.
     */
    View getHeaderView(int position, View convertView, ViewGroup parent);
}
